{% extends 'master.html' %}
{% load static %}
{% block content %}
    <link href="{% static "css/search.css" %}" rel="stylesheet" type="text/css" media="all" />
    <div class="main" >
        <ul>
            {% for article in SearchResult %}
                <li class="title" style="overflow : hidden;text-overflow:ellipsis;white-space: nowrap;">
                    <article class="excerpt excerpt-first">
                        <div class="titleright">
                            <b><a class="gotoArchive" href="{% url 'newsrecommand:news' article.article_id %}"
                                  title="{{ article.title }}">{{ article.title }}</a></b>
                        </div>
                        <div class="titleleft">
                            <span class="date">{{ article.date }}</span>
                        </div>
                    </article>
                </li>
            {% endfor %}
        </ul>
        <div class="ui small pagination menu">
            {% if SearchResult.has_previous %}
                <a href="?type={{ type }}&page={{ SearchResult.previous_page_number }}"> &lt;&lt;上一页 </a>
            {% endif %}
            <b>当前第{{ SearchResult.number }} 页</b>&nbsp;&nbsp; -共{{ SearchResult.paginator.num_pages }}页-
            {% if SearchResult.has_next %}
                <a href="?type={{ type }}&page={{ SearchResult.next_page_number }}">下一页&gt;&gt;</a>
            {% endif %}
        </div>
    </div>
{% endblock %}